﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.WebApiTool
{
    public class DResult
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public Type Type { get; set; }

        public string TypeString { get; set; }

        public List<DResultItem> Items { get; set; }

        public DResult(Type type, string name, string description)
        {
            Type = type;
            Name = name;
            Description = description;
            TypeString = Type.Name;

            Items = new List<DResultItem>();
        }

        public DResult(string typeString, Type type, string name, string description)
        {
            Type = type;
            Name = name;
            Description = description;
            TypeString = typeString;

            Items = new List<DResultItem>();
        }

        public void AddItem(DResultItem item)
        {
            Items.Add(item);
        }
    }
}
